﻿using Common.Models;

namespace Home.MobileSales.Common.Models
{
    public class DataManager
    {
        private static DataManager _dataManager;

        public static DataManager GetInstance()
        {
            return _dataManager ?? (_dataManager = new DataManager());
        }

        private VisitRepository _visits;

        public VisitRepository Visists
        {
            get { return _visits ?? (_visits = new VisitRepository()); }
        }

        private OrderRepository _orders;
        public OrderRepository Orders
        {
            get { return _orders ?? (_orders = new OrderRepository()); }
        }

        private OrderRecordRepository _orderRecords;
        public OrderRecordRepository OrderRecords
        {
            get
            {
                return _orderRecords ?? (_orderRecords = new OrderRecordRepository());
            }
        }

        private BuyPointRepository _buyPoints;
        public  BuyPointRepository BuyPoints
        {
            get
            {
                return _buyPoints ?? (_buyPoints = new BuyPointRepository());
                }
        }

        private SheduleVisitsRepository _sheduleVisits;
        public SheduleVisitsRepository SheduleVisits
        {
            get
            {
                return _sheduleVisits ?? (_sheduleVisits = new SheduleVisitsRepository());
            }
        }

        private BuyerRepository _buyers;
        public BuyerRepository Buyers
        {
            get
            {
                return _buyers ?? (_buyers = new BuyerRepository());
            }
        }

        private GoodRepository _goods;
        public GoodRepository Goods
        {
            get
            {
                return _goods ?? (_goods = new GoodRepository());
            }
        }

        private GroupRepository _groups;
        public GroupRepository Groups
        {
            get
            {
                return _groups ?? (_groups = new GroupRepository());
            }
        }

        private TradeMarkRepository _tradeMarks;
        public TradeMarkRepository TradeMarks
        {
            get
            {
                return _tradeMarks ?? (_tradeMarks = new TradeMarkRepository());
            }
        }

        private SkladRepository _sklads;
        public SkladRepository Sklads
        {
            get
            {
                return _sklads ?? (_sklads = new SkladRepository());
            }
        }

        private RemainingRepository _remainingRepository;
        public RemainingRepository Remainings
        {
            get
            {
                return _remainingRepository ?? (_remainingRepository = new RemainingRepository());
            }
        }
    }

}
